\section{user\_\-handler::ic\_\-handler Class Reference}
\label{classuser__handler_1_1ic__handler}\index{user_handler::ic_handler@{user\_\-handler::ic\_\-handler}}
This class handles all messages from the microcontroller.  


{\tt \#include $<$ic\_\-handler.h$>$}

Inheritance diagram for user\_\-handler::ic\_\-handler::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classuser__handler_1_1ic__handler}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\bf{ic\_\-handler} (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ ic, boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ web, boost::shared\_\-ptr$<$ \bf{network::connection\_\-manager} $>$ mgr)
\begin{CompactList}\small\item\em \doxyref{ic\_\-handler}{p.}{classuser__handler_1_1ic__handler} creates the handler. Don't call this constructor directly, use create instead. \item\end{CompactList}\item 
virtual \bf{$\sim$ic\_\-handler} ()\label{classuser__handler_1_1ic__handler_65838ccc3d67911d4c85ecb1b58f7451}

\item 
virtual void \bf{handle\_\-event} (boost::shared\_\-ptr$<$ \bf{network::message} $>$ n)
\begin{CompactList}\small\item\em handle\_\-event handles all events concerning from the microcontroller. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static boost::shared\_\-ptr$<$ \bf{user\_\-handler::ic\_\-handler} $>$ \bf{create} (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ ic, boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ web, boost::shared\_\-ptr$<$ \bf{network::connection\_\-manager} $>$ mgr)
\begin{CompactList}\small\item\em create creates the \doxyref{ic\_\-handler}{p.}{classuser__handler_1_1ic__handler} \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This class handles all messages from the microcontroller. 



Definition at line 29 of file ic\_\-handler.h.

\subsection{Constructor \& Destructor Documentation}
\index{user_handler::ic_handler@{user\_\-handler::ic\_\-handler}!ic_handler@{ic\_\-handler}}
\index{ic_handler@{ic\_\-handler}!user_handler::ic_handler@{user\_\-handler::ic\_\-handler}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}user\_\-handler::ic\_\-handler::ic\_\-handler (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ {\em ic}, boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ {\em web}, boost::shared\_\-ptr$<$ \bf{network::connection\_\-manager} $>$ {\em mgr})\hspace{0.3cm}{\tt  [inline]}}\label{classuser__handler_1_1ic__handler_580dffedd2ad7e7470de34625efd3299}


\doxyref{ic\_\-handler}{p.}{classuser__handler_1_1ic__handler} creates the handler. Don't call this constructor directly, use create instead. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ic}]is the socket to the microcontroller \item[{\em web}]is the socket to the webinterface \item[{\em mgr}]is a pointer to the connection-manager. \end{description}
\end{Desc}


Definition at line 39 of file ic\_\-handler.h.

\begin{Code}\begin{verbatim}42                 : _ic(ic), _web(web), _mgr(mgr) {}
\end{verbatim}\end{Code}




\subsection{Member Function Documentation}
\index{user_handler::ic_handler@{user\_\-handler::ic\_\-handler}!create@{create}}
\index{create@{create}!user_handler::ic_handler@{user\_\-handler::ic\_\-handler}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static boost::shared\_\-ptr$<$\bf{user\_\-handler::ic\_\-handler}$>$ user\_\-handler::ic\_\-handler::create (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ {\em ic}, boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ {\em web}, boost::shared\_\-ptr$<$ \bf{network::connection\_\-manager} $>$ {\em mgr})\hspace{0.3cm}{\tt  [inline, static]}}\label{classuser__handler_1_1ic__handler_c8cff6b66c2d16477ba94cf256959f9b}


create creates the \doxyref{ic\_\-handler}{p.}{classuser__handler_1_1ic__handler} 

\begin{Desc}
\item[See also:]\doxyref{ic\_\-handler}{p.}{classuser__handler_1_1ic__handler} \end{Desc}


Definition at line 58 of file ic\_\-handler.h.

\begin{Code}\begin{verbatim}62                 {
63                         boost::shared_ptr<user_handler::ic_handler> ptr(
64                                 new user_handler::ic_handler(ic, web, mgr));
65                         ptr->_this = ptr;
66                         return ptr;
67                 }
\end{verbatim}\end{Code}


\index{user_handler::ic_handler@{user\_\-handler::ic\_\-handler}!handle_event@{handle\_\-event}}
\index{handle_event@{handle\_\-event}!user_handler::ic_handler@{user\_\-handler::ic\_\-handler}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void user\_\-handler::ic\_\-handler::handle\_\-event (boost::shared\_\-ptr$<$ \bf{network::message} $>$ {\em n})\hspace{0.3cm}{\tt  [virtual]}}\label{classuser__handler_1_1ic__handler_54afc83b390875235c4672866805c0d7}


handle\_\-event handles all events concerning from the microcontroller. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]is the received message. \end{description}
\end{Desc}


Implements \bf{handler::event\_\-handler} \doxyref{p.}{classhandler_1_1event__handler_7ff75131a32fb17cf4addc4581344bff}.

Definition at line 3 of file ic\_\-handler.cpp.

\begin{Code}\begin{verbatim}5 {
6         if(n->type == network::RECEIVE) {
7                 boost::shared_ptr<model::dom> node(n->node);
8                 if(node->name() == "temp") {
9                         _web->send(_mgr->get_sender(_web)->send(node));
10                 }
11         } else if(n->type == network::DELETE) {
12                 boost::shared_ptr<user_handler::ic_handler> tmp(_this.lock());
13                 fire_listener();        // notify collection to remove me
14         }
15 }
\end{verbatim}\end{Code}




The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
user\_\-handler/ic\_\-handler.h\item 
user\_\-handler/ic\_\-handler.cpp\end{CompactItemize}
